package threadlocalsingleton;

public class ThreadLocalSingleton {

    private static final ThreadLocal<ThreadLocalSingleton> SINGLETON = new ThreadLocal<ThreadLocalSingleton>(){
        @Override
        protected ThreadLocalSingleton initialValue() {
            return new ThreadLocalSingleton();
        }
    };

    private ThreadLocalSingleton(){

    }

    public final static ThreadLocalSingleton getInstance() {
        return SINGLETON.get();
    }
}
